package com.example.controller;

import com.example.model.SysUser;
import com.example.service.SysUserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/login")
public class LoginControler {

    @Resource
    public SysUserService sysUserService;

    @PostMapping("/user")
    public SysUser selectLoginUser(@RequestBody SysUser sysUser) {
        return  sysUserService.selectSysUserById(sysUser.getTid());
    }
}
